package entity;

public class Student {
    private String name;
    private int sid;
    private String sex;
    private int age;
    private double gpa;
    private int grade;
    private boolean inschool;
    private String phonenum;
    //构造方法,在实例化的时候调用
    //无参数构造方法
    public Student(){
        System.out.println("构造方法被调用");
    }
    //有参构造方法
    public Student(String name, int sid, String sex, int age, double gpa, int grade, boolean inschool, String phonenum){
        this.name=name;
        this.sid=sid;
        this.sex=sex;
        this.age=age;
        this.gpa=gpa;
        this.grade=grade;
        this.inschool=inschool;
        this.phonenum=phonenum;
    }

    @Override
    public String toString() {
        return "entity.Student{" +
                "姓名=长沙南方'" + name + '\'' +
                ", 学号=" + sid +
                ", 性别='" + sex + '\'' +
                ", age=" + age +
                ", gpa=" + gpa +
                ", grade=" + grade +
                ", inschool=" + inschool +
                ", phonenum='" + phonenum + '\'' +
                '}';
    }
}